//
//  ForgetPasswordFourViewController.m
//  PlayerWorld
//
//  Created by 1 on 16/5/16.
//  Copyright © 2016年 刘成. All rights reserved.
//
#define UISCREEN_WIDTH  [UIScreen mainScreen].bounds.size.width
#define UISCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height

#import "ForgetPasswordFourViewController.h"
#import "SignViewController.h"
@interface ForgetPasswordFourViewController ()

@end

@implementation ForgetPasswordFourViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:self action:nil];
    self.view.backgroundColor = [UIColor groupTableViewBackgroundColor];
    self.title = @"找回密码";
    
    UIImageView *passwordImageView = [[UIImageView alloc]initWithFrame:CGRectMake((UISCREEN_WIDTH-50)/2, 100, 50, 50)];
    passwordImageView.image = [UIImage imageNamed:@"smile"];
    [self.view addSubview:passwordImageView];
    
    UILabel *setUpMoneyPasswordLabel3 = [[UILabel alloc]initWithFrame:CGRectMake((UISCREEN_WIDTH-150)/2, CGRectGetMaxY(passwordImageView.frame)+1,150, 40)];
    setUpMoneyPasswordLabel3.text = @"恭喜您！新密码设置成功！";
    setUpMoneyPasswordLabel3.textColor = [UIColor blackColor];
    setUpMoneyPasswordLabel3.backgroundColor = [UIColor clearColor];
    setUpMoneyPasswordLabel3.font = [UIFont systemFontOfSize:12];
    [self.view addSubview:setUpMoneyPasswordLabel3];
    
    UIButton *setUpMoneyPasswordButton = [[UIButton alloc]initWithFrame:CGRectMake(20, CGRectGetMaxY(setUpMoneyPasswordLabel3.frame)+1, UISCREEN_WIDTH-20-20, 40)];
    [setUpMoneyPasswordButton addTarget:self action:@selector(setUpMoneyPasswordButtonAction:) forControlEvents:UIControlEventTouchUpInside];
    [setUpMoneyPasswordButton setTitle:@"立即登录" forState:UIControlStateNormal];
    [setUpMoneyPasswordButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    setUpMoneyPasswordButton.backgroundColor = [UIColor colorWithRed:46/255.0f green:168/255.0f blue:289/255.0f alpha:1];
    [self.view addSubview:setUpMoneyPasswordButton];
    
}

- (void)setUpMoneyPasswordButtonAction:(UIButton *)sender {
    
    SignViewController *sVC= [[SignViewController alloc] init];
    [self.navigationController pushViewController:sVC animated:YES];
}


//UITextField控件协议方法：当点击返回按钮时方法执行
-(BOOL)textFieldShouldReturn:(UITextField *)textField{
    [textField resignFirstResponder];
    return YES;
}

@end
